package org.springblade.desk.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yue.zhang
 */
@AllArgsConstructor
@Getter
public enum CollectSubCategoryEnum {

	CODE(1,"技术"),
	FUN(2,"娱乐")
	;

	private int type;
	private String desc;


	public static CollectSubCategoryEnum getByType(int type){
		for(CollectSubCategoryEnum item : CollectSubCategoryEnum.values()){
			if(item.getType() == type){
				return item;
			}
		}
		return null;
	}

	public static String getDescByType(int type){
		for(CollectSubCategoryEnum item : CollectSubCategoryEnum.values()){
			if(item.getType() == type){
				return item.getDesc();
			}
		}
		return null;
	}

}
